from django.db import models

from libs.models import GeneralModel
# Create your models here.


class VisitorModel(GeneralModel):
    """访客表模型"""

    device = models.CharField("设备名称", max_length=50, help_text="设备名称", null=True)
    system = models.CharField("系统名称", max_length=50, help_text="设备名称", null=True)
    ip = models.CharField("来访 IP", max_length=20, help_text="来访 IP")
    browser = models.CharField("浏览器类型", max_length=50, help_text="浏览器类型")
    user_agent = models.TextField("UserAgent", max_length=512, help_text="UserAgent")

    remarks = models.CharField("备注", max_length=48, help_text="备注", null=True, blank=True)

    class Meta:
        ordering = ["-create_time"]
        db_table = "visitor"
        verbose_name = "访客表"
        verbose_name_plural = "访客表"
